package com.zenob.secalendar.view;

import javax.microedition.lcdui.Command;
import javax.microedition.lcdui.Displayable;

import com.zenob.secalendar.SeCalendarApp;
import com.zenob.secalendar.pim.PimCalendarManager;
import com.zenob.secalendar.ui.View;

public class CalendarView extends View {

	private SeCalendarApp mApplication;
	
	private PimCalendarManager pimCalendarMgr;
	
	private Command mExit;
	
	
	
	public CalendarView(SeCalendarApp app) {
		super("Calendar");

		mApplication = app;
		
		pimCalendarMgr = new PimCalendarManager();
		
		pimCalendarMgr.getAllEvents();
		
		
		mExit = new Command("Exit", Command.EXIT, 0);
		this.addCommand(mExit);
		
	}

	public void commandAction(Command c, Displayable d) {

		if(c==mExit) {
			mApplication.closeApp();
		}
		
	}

}
